import {RouterModule, Routes} from '@angular/router';
import {NgModule} from '@angular/core';
import {ModuleComponent} from './module.component';

const routes: Routes = [
    {path: '', component: ModuleComponent,
        children: [
            {path: '', redirectTo: 'template-example', pathMatch: 'full'},
            {path: 'index', loadChildren: './index/index.module#IndexModule'},
            {path: 'template-example', loadChildren: './template-example/template-example.module#TemplateExampleModule'},
            {path: 'system-management', loadChildren: './system-management/system-management.module#SystemManagementModule'},
            // this line is for module route don't remove
            {path: 'goods-management', loadChildren: './goods-management/goods-management.module#GoodsManagementModule'},
            {path: 'instant-messaging', loadChildren: './instant-messaging/instant-messaging.module#InstantMessagingModule'},
            {path: 'finance-management', loadChildren: './finance-management/finance-management.module#FinanceManagementModule'},
            {path: 'wms-management', loadChildren: './wms-management/wms-management.module#WmsManagementModule'},
            {path: 'after-sale-management', loadChildren: './after-sale-management/after-sale-management.module#AfterSaleManagementModule'},
            {path: 'draw-management', loadChildren: './draw-management/draw-management.module#DrawManagementModule'},
            {path: 'config-management', loadChildren: './config-management/config-management.module#ConfigManagementModule'},
            {path: 'social-management', loadChildren: './social-management/social-management.module#SocialManagementModule'},
            {path: 'order-management', loadChildren: './order-management/order-management.module#OrderManagementModule'},
            {path: 'member-management', loadChildren: './member-management/member-management.module#MemberManagementModule'},
            {path: 'message-management', loadChildren: './message-management/message-management.module#MessageManagementModule'},
        ]
    },
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class ModuleRoutingModule {
}
